package com.example.kotlinstudy.bean

import Study

//class Student (override var name: String, var grade:Int): Person(name) {
//    var number=""
//    fun study(){
//        println(name+"的成绩是："+grade)
//    }
//}

 open class Student(name: String, age: Int, val number: String, val grade: Int) : Person(name, age) ,Study{
   // init方法，替代以前的construct方法
    init {
       println("name is" + name)
       println("age is" + age)
    }



    constructor(name: String, age: Int,  number: String):this(name,age,number,0){

    }

    constructor(name: String):this(name,0,"",0){

    }

    override fun readBooks() {
        TODO("Not yet implemented")
    }

    override fun doHomework() {
        TODO("Not yet implemented")
    }


//    constructor(name: String, age: Int):super(name,0){
//
//    }



}